﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PersonalExpenseTracker.PersistenceLayer;

namespace PersonalExpenseTracker
{
    public partial class SummaryUserControl : UserControl
    {
        public SummaryUserControl()
        {
            InitializeComponent();
        }

        private void SummaryUserControl_Load(object sender, EventArgs e)
        {
            lblThisMonth.Text = 
                string.Format("This month total expense: {0}", 
                    PersistenceLayerFacade.GetThisMonthTotalExpense());
            lblThisYear.Text =
                string.Format("This year total expense: {0}",
                    PersistenceLayerFacade.GetThisYearTotalExpense());
            lblAllExpense.Text =
                string.Format("Total expenses: {0}",
                    PersistenceLayerFacade.GetAllExpenseAmount());
        }
    }
}
